package com.tosit.driverschool.dao;

import com.tosit.driverschool.common.entity.Subject;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

@Repository
public interface SubjectRepository extends JpaRepository<Subject, Integer>, JpaSpecificationExecutor<Subject> {
/*    @Modifying
    @Transactional
    @Query("delete from subject where id in (?1)")
    int deleteByIds(@Param("ids") List<Integer> ids);*/

    /*@Modifying
    @Transactional
    @Query("delete from subject where id = ?1")
    int deleteBySid(Integer id);*/

}
